import {Component} from '@angular/core';
import {IonicPage,ModalController} from 'ionic-angular';
import {ROUTER} from "../../service/router.service";
import {GoodModel} from "../../model/good.model";
import {LocalStorage} from "../../utils/localstorage.utils";
import {GiftConfirmPage} from "../gift-confirm/gift-confirm";

@IonicPage()
@Component({
  selector: 'page-integral-mall-page',
  templateUrl: 'integral-mall-page.html',
})
export class IntegralMallPage {
  good: GoodModel;
  info = {
    one: "1.物品数量充足并且您的积分满足相应商品兑换要求，即可参与兑换。",
    two: "2.商品兑换申请一经处理，将不能取消或更改。成功兑换商品后，将不再接受退换货服务。",
    three: "3.如有问题，可至门店管理处咨询。"
  }

  constructor(public ls: LocalStorage,
              private ROUTER: ROUTER,
              private modalCtrl:ModalController) {
    this.good = this.ls.getObject('good') as GoodModel;
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad IntegralMallPage');
  }

  gotoIntegralStoreOrder() {
    let profileModal = this.modalCtrl.create(GiftConfirmPage, {}, {showBackdrop: true});
    profileModal.present();
  }

}
